local kl__fujie = fk.CreateSkill{
  name = "kl__fujie",
  tags = { Skill.Limited },
}


kl__fujie:addEffect(fk.TurnStart, {
  can_trigger = function(self, event, target, player, data)
    return target ~= player and player:hasSkill(kl__fujie.name) and player:usedSkillTimes(kl__fujie.name, Player.HistoryGame) == 0
  end,
  on_cost = function (self, event, target, player, data)
    local to = player.room:askToChoosePlayers(player,{
      min_num = 1,
      max_num = 1,
      targets = player.room.alive_players,
      prompt = "附接：你可以选择一名角色令其翻面，然后 %dest 跳过当前回合::"..target.id,
      cancelable = true,
      skill_name = kl__fujie.name,
    })
    if #to > 0 then
      event:setCostData(self, {to = to })
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local to = event:getCostData(self).to[1]
    to:turnOver()
    data.turn_end = true
  end,
})


return kl__fujie